import WeexNativeModule from "../WeexNativeModule";
// let baseUrl = "http://120.27.43.72:8882/"; //正式
// let baseUrl = "http://121.42.153.1:8885/"; //测试
let baseUrl = "http://47.97.26.165:8885/"; //演示
class ACApi{

    /**
     * 添加急救处理
     */
    static addDiagnosis(json,jscallback){
        let url = "addDiagnosis";
        WeexNativeModule.post(baseUrl,url,json,jscallback);
    }

    /**
     * 获取处理详情
     */
    static getFirstAidCase(pid,jscallback){
        let url = 'getFirstAidCase/'+pid;
        WeexNativeModule.get(baseUrl,url,jscallback);
    }
      /**
     * 添加急诊PCI
     */
    static pcis(json,jscallback){
        let url = "pcis";
        WeexNativeModule.post(baseUrl,url,json,jscallback);
    }
    /**
     * 获取急诊PCI
     */
    static getPcis(orderId,jscallback){
        let url = 'pcis/'+orderId;
        WeexNativeModule.get(baseUrl,url,jscallback);
    }

    /**
     * 添加病情评估
     */
    static evaluations(json,jscallback){
        let url = "chestpains/regmodels/evaluations";
        WeexNativeModule.post(baseUrl,url,json,jscallback);
    }
    /**
     * 获取病情评估
     */
    static getEvaluations(orderId,jscallback){
        let url = 'chestpains/regmodels/evaluations/'+orderId;
        WeexNativeModule.get(baseUrl,url,jscallback);
    }

    /**
     * 添加生命体征
     */
    static vitalsigns(json,jscallback){
        let url = "vitalsigns";
        WeexNativeModule.post(baseUrl,url,json,jscallback);
    }
    /**
     * 获取生命体征
     */
    static getVitalsigns(orderId,jscallback){
        let url = 'vitalsigns/'+orderId;
        WeexNativeModule.get(baseUrl,url,jscallback);
    } 

    /**
     * 获取grace评分
     */
    static getEMGraceDetail(orderId,jscallback){
        let url = "graces/"+orderId;
        WeexNativeModule.post(baseUrl,url,{},jscallback)
    }
    /**
     * 保存grace评分
     */
    static saveEMGraceDetail(content,jscallback){
        let url = "graces";
        WeexNativeModule.post(baseUrl,url,content,jscallback);
    }

    /**
     * 保存cabg
     */
    static saveCABG(content,jscallback){
        let url = "cabg"
        WeexNativeModule.post(baseUrl,url,content,jscallback);
    }

    /**
     * 获取cabg
     */
    static getCAVGDetail(orderid,jscallback){
        let url = "cabg/"+orderid;
        WeexNativeModule.get(baseUrl,url,jscallback);
    }

    /**
     * 保存辅助检查
     */
    static auxiliaries(content,jscallback){
        let url = "chestpains/emergenmodels/auxiliaries"
        WeexNativeModule.post(baseUrl,url,content,jscallback);
    }

    /**
     * 获取辅助检查
     */
    static getAuxiliaries(orderid,jscallback){
        let url = "chestpains/emergenmodels/auxiliaries/"+orderid;
        WeexNativeModule.get(baseUrl,url,jscallback);
    }

    /**
     * 保存ACS
     */
    static prescriptions(content,jscallback){
        let url = "prescriptions"
        WeexNativeModule.post(baseUrl,url,content,jscallback);
    }

    /**
     * 获取ACS
     */
    static getPrescriptions(orderid,jscallback){
        let url = "prescriptions/"+orderid;
        WeexNativeModule.get(baseUrl,url,jscallback);
    }

    /**
     * 保存第一次初步诊断
     */
    static diagnosisOne(content,jscallback){
        let url = "1/preliminaries/diagnosis"
        WeexNativeModule.post(baseUrl,url,content,jscallback);
    }

    /**
     * 获取第一次初步诊断
     */
    static getDiagnosisOne(orderid,jscallback){
        let url = "1/preliminaries/diagnosis/"+orderid;
        WeexNativeModule.get(baseUrl,url,jscallback);
    }

    /**
     * 保存第2次初步诊断
     */
    static diagnosisTwo(content,jscallback){
        let url = "2/preliminaries/diagnosis"
        WeexNativeModule.post(baseUrl,url,content,jscallback);
    }

    /**
     * 获取第2次初步诊断
     */
    static getDiagnosisTwo(orderid,jscallback){
        let url = "2/preliminaries/diagnosis/"+orderid;
        WeexNativeModule.get(baseUrl,url,jscallback);
    }
    /**
     * 保存第一次初步诊断
     */
    static saveFirstRSData(content,jscallback){
        let url = "1/thrombolysis";
        WeexNativeModule.post(baseUrl,url,content,jscallback);
    }

    /**
     * 获取第一次溶栓
     */
    static getFirstRSData(orderId,jscallback){
        let url= "1/thrombolysis/"+orderId;
        WeexNativeModule.get(baseUrl,url,jscallback);
    }
    /**
     * 保存第二次溶栓
     */
    static saveSencondRSData(content,jscallback){
        let url = "2/thrombolysis";
        WeexNativeModule.post(baseUrl,url,content,jscallback);
    }

    /**
     * 获取第二次溶栓
     */
    static getSencondRSData(orderId,jscallback){
        let url= "2/thrombolysis/"+orderId;
        WeexNativeModule.get(baseUrl,url,jscallback);
    }

    /**
     * 获取胸痛诊疗
     */
    static getdiagtreatsAidorders(orderId,jscallback){
        let url= "diagtreats/aidorders/"+orderId;
        WeexNativeModule.get(baseUrl,url,jscallback);
    }

     /**
     * 保存胸痛诊疗
     */
    static diagtreatsAidorders(content,jscallback){
        let url = "diagtreats/aidorders";
        WeexNativeModule.post(baseUrl,url,content,jscallback);
    }

    /**
     * 新建院外急救单
     * @param content
     * @param jscallback
     */
    static createEMOutPage(content,jscallback){
        let url = "carout";
        WeexNativeModule.post(baseUrl,url,content,jscallback)
    }

    /**
     * 新建院内急救单
     * @param content
     * @param jscallback
     */
    static createEMInPage(content,jscallback){
        let url = "aidorders";
        WeexNativeModule.post(baseUrl,url,content,jscallback)
    }
}

export default ACApi;